package b1.mobile.blackberry.controller;

import b1.mobile.blackberry.entity.AppConfiguration;
import b1.mobile.blackberry.io.http.ServerInfo;

public class AgentController {

	public static AppConfiguration Configuration = new AppConfiguration();
	
	/**
	 * static constructor load the configuration
	 */
	static{
		Configuration = AppConfiguration.getConfiguration();
	}
	
	public static void Logon(String user, String password, String serverAddress, String companyDB, String phoneNum, String userCode, ILogonListener callback)
	{
		
	}
	
	public static void SaveConfiguration(AppConfiguration config){
		AppConfiguration.saveConfiguration(config);
		Configuration = config;
	}
	
	public static ServerInfo getServer(){
		return new ServerInfo(Configuration.getServerAddress(), Configuration.isSSL());
	}
}
